<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>查询</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="CHAPTER">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="dml-delete.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="dml.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="datatype.html">快进</a></td><td width="10%" align="right" valign="top"><a href="queries-overview.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="CHAPTER"><h1><a name="QUERIES"></a>章7. 查询</h1>
<div>
<dl>
<dt><b>目录</b></dt>
<dt>7.1. <a href="queries-overview.html">概述</a></dt>
<dt>7.2. <a href="queries-table-expressions.html">表表达式</a></dt>
<dd><dl>
<dt>7.2.1. <a href="queries-table-expressions.html#QUERIES-FROM"><tt class="LITERAL">FROM</tt> 子句</a></dt>
<dt>7.2.2. <a href="queries-table-expressions.html#QUERIES-WHERE"><tt class="LITERAL">WHERE</tt> 子句</a></dt>
<dt>7.2.3. <a href="queries-table-expressions.html#QUERIES-GROUP"><tt class="LITERAL">GROUP BY</tt> 和 <tt class="LITERAL">HAVING</tt> 子句</a></dt>
</dl></dd>
<dt>7.3. <a href="queries-select-lists.html">选择列表</a></dt>
<dd><dl>
<dt>7.3.1. <a href="queries-select-lists.html#QUERIES-SELECT-LIST-ITEMS">选择列表项</a></dt>
<dt>7.3.2. <a href="queries-select-lists.html#QUERIES-COLUMN-LABELS">字段标签</a></dt>
<dt>7.3.3. <a href="queries-select-lists.html#QUERIES-DISTINCT"><tt class="LITERAL">DISTINCT</tt></a></dt>
</dl></dd>
<dt>7.4. <a href="queries-union.html">组合查询</a></dt>
<dt>7.5. <a href="queries-order.html">行排序</a></dt>
<dt>7.6. <a href="queries-limit.html"><tt class="LITERAL">LIMIT</tt> 和 <tt class="LITERAL">OFFSET</tt></a></dt>
<dt>7.7. <a href="queries-values.html"><tt class="LITERAL">VALUES</tt> 列表</a></dt>
</dl>
</div>
<a name="AEN2974"></a><a name="AEN2976"></a>
<p>前面的章节解释了如何创建表，如何用数据填充它们，以及如何操作那些数据。现在我们终于可以讨论如何从数据库中检索数据了。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="dml-delete.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="queries-overview.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">删除数据</td><td width="34%" align="center" valign="top"><a href="sql.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">概述</td></tr>
</table>
</div>
</body></html>